// 所有路由生效
import userRouter from './user.js';
import projectRouter from './project.js';
import projectMemberRouter from './projectMember.js';

const routerArr = [userRouter, projectRouter, projectMemberRouter];

const useRouters = (app: any) => {
  routerArr.forEach((router) => {
    app.use(
      router.routes(), // 路由中的回调会被触发
      router.allowedMethods()
    );
  });
};

export default useRouters;
